package com.he.eduvod.controller;

import com.he.commonutils.R;
import com.he.eduvod.service.VideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(description = "阿里云视频模块")
@RestController
@CrossOrigin
@RequestMapping("/eduvod/vod/")
public class VodController {
    @Autowired
    private VideoService videoService;

    @DeleteMapping("delete/{id}")
    public R delAliVideo(@PathVariable("id") String vid){
        videoService.removeVideoId(vid);
        return R.ok();
    }

    @DeleteMapping("delete-batch")
    public R deleteAliVidelBatch(@RequestParam("videoList") List<String> videoIdList){
        videoService.removeVideoList(videoIdList);
        return R.ok();
    }



}
